<?php

namespace App\Models\Member;

use Illuminate\Database\Eloquent\Model;

class Price extends Model
{
    protected $table = 'jxt_member_price';

    public $timestamps = false;

    /*public static function boot()
    {
        parent::boot();

        static::saving(function ($model) {

        });
    }*/

    public function user()
    {
        return $this->hasMany(App\Models\Member\User::class,'vip_id');
    }

    public static function options()
    {
        $options = static::select('id','name as text')->get();
        $selectOption = [];
        foreach ($options as $option){
            $selectOption[$option->id] = $option->text;
        }
        return $selectOption;
    }

}
